From 1a962664ee0e339c7218c643845a697a6ecd1ad7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 27 Sep 2008 03:43:50 +0000 Subject: [PATCH] =?utf8?q?Bug=20552956=20=E2=80=93=20Should=20check=20comp?= =?utf8?q?osite=20extension=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2008-09-26 Matthias Clasen Bug 552956 – Should check composite extension version * gdk/x11/gdkdisplay-x11.c: Check that the version of the composite extension is at least 0.4. Patch by Owen Taylor svn path=/trunk/; revision=21530 --- ChangeLog | 8 ++++++++ gdk/x11/gdkdisplay-x11.c | 12 +++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f7b179f19d..a84cb04cbb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-09-26 Matthias Clasen + + Bug 552956 – Should check composite extension version + + * gdk/x11/gdkdisplay-x11.c: Check that the version of the + composite extension is at least 0.4. + Patch by Owen Taylor + 2008-09-26 Matthias Clasen Bug 553803 – eventually call XCloseDevice on XOpenDevice results diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index d791975155..e48c16cb41 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -236,7 +236,17 @@ gdk_display_open (const gchar *display_name) #ifdef HAVE_XCOMPOSITE if (XCompositeQueryExtension (display_x11->xdisplay, &ignore, &ignore)) - display_x11->have_xcomposite = TRUE; + { + int major, minor; + + XCompositeQueryVersion (display_x11->xdisplay, &major, &minor); + + /* Prior to Composite version 0.4, composited windows clipped their + * parents, so you had to use IncludeInferiors to draw to the parent + * This isn't useful for our purposes, so require 0.4 + */ + display_x11->have_xcomposite = major > 0 || (major == 0 && minor >= 4); + } else #endif display_x11->have_xcomposite = FALSE; -- 2.30.2